﻿using FPSO.Models.Constant;
using FPSO.Models.TagMapping;
using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Models.ViewModel.Controls
{
    public class UCValveViewModel : NotificationObject
    {
        public UCValveViewModel()
        {
            valveName = "";
            valveStatus = 0;
        }

        
        private string valveName;

		/// <summary>
		/// 阀门名称
		/// </summary>
		public string ValveName
        {
            get { return valveName; }
            set
            {
                valveName = value;
                RaisePropertyChanged("ValveName");
            }
        }

        private int valveStatus;

        /// <summary>
        /// 阀门状态 0：远程，1：本地手动，2：本地自动
        /// </summary>
        public int ValveStatus
		{
            get { return valveStatus; }
            set
            {
				valveStatus = value;
                RaisePropertyChanged("ValveStatus");
            }
        }


        private int deviceStatus;

        /// <summary>
        /// 设备状态 0：关闭，1：开启，2：正在关闭，3：正在开启，4：故障
        /// </summary>
        public int DeviceStatus
        {
            get { return deviceStatus; }
            set
            {
                deviceStatus = value;
                RaisePropertyChanged("DeviceStatus");
            }
        }

        private double valveValue;

        /// <summary>
        /// 设备百分比
        /// </summary>
        public double ValveValue
        {
            get { return valveValue; }
            set
            {
                valveValue = value;
                RaisePropertyChanged("ValveValue");
            }
        }
    }
}
